package 第九章作业;

public class animal3 {
    System.out.println("---------多态方法调用---------");

    Animal animal1 = new Dog();
    animal1.eat();

    Animal animal2 = new Cat();
    animal2.eat();

    Dog dog = (Dog) animal1;
    dog.lookDoor();
    dog.eat();
}
